package izzat.fit.dbservice.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import izzat.fit.dbservice.base.entity.BaseEntity;
import izzat.fit.dbservice.base.mapper.BaseMapper;
import izzat.fit.dbservice.entity.action.Action;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @InterfaceName: ActionMapper
 * @Description:
 * @Author: Izzat
 * @Date: 2019-12-29 17:45
 * @Version
 */
@DS(value = "fit_action_db")
@Mapper
public interface ActionMapper extends BaseMapper{
    @Select("SELECT * FROM action")
    List<Action> getAllAction();

    @Select("SELECT * FROM action WHERE id = #{id}")
    Action findById(Integer id);

    @Select("SELECT * FROM action WHERE part = #{part}")
    List<Action> findByPart(String part);
}
